package com.zs.toolbox.web2j.auth.security;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;

/**
 * @author shuai.zhang  on 2018/9/13
 * @version 1.0.0
 * @description 主要用来负责登陆使用
 * @deprecated  暂时先不写，以后再说
 */
public class WtJWTDynamicPathFilter extends UsernamePasswordAuthenticationFilter {
    private static Logger logger = LoggerFactory.getLogger(WtJWTDynamicPathFilter.class);

    private AuthenticationManager authenticationManager;

    public WtJWTDynamicPathFilter(AuthenticationManager authenticationManager) {
        this.authenticationManager = authenticationManager;
    }

//    /**
//     * @param request
//     * @param response
//     * @return
//     * @throws AuthenticationException
//     * @description 从上下文中解析出用户名及密码 并生成校验对象
//     */
//    @Override
//    public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {
//        /*
//        * 获得用户权限列表中的PATTER路径
//        * */
//        /*
//        *  获得其所有合法的CODE值
//        *
//        * */
//
//        /*
//        * 获得当前路径
//        *
//        * 遍历当前CODE值,
//        * */
//        SecurityContextHolder.getContext().getAuthentication();
//
//    }


}
